home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / wemdemo4.zip / INFO / W3.1 (.txt) < prev    next >
GNU Info File  |  1994-09-21  |  50KB  |  897 lines

  1. This is Info file ../info/w3, produced by Makeinfo-1.56 from the input
  2. file w3.txi.
  3.    This file documents the Emacs-w3 World Wide Web browser.
  4.    Copyright (C) 1993, 1994 William M. Perry
  5.    Permission is granted to make and distribute verbatim copies of this
  6. manual provided the copyright notice and this permission notice are
  7. preserved on all copies.
  8. File: w3,  Node: Top,  Next: Introduction,  Up: (DIR)
  9.    This manual documents the Emacs-w3 World Wide Web browser, a Lisp
  10. program which runs as a subsystem under Emacs.  The manual is divided
  11. into the following chapters.
  12. * Menu:
  13. * Introduction::                What exactly is Emacs-w3?
  14. * Setting Up::                  How to set up and install Emacs-w3.
  15. * Basic Usage::                 Basic movement and usage of Emacs-w3.
  16. * Compatibility w/Mosaic::      Explanation of how Emacs-w3 is compatible
  17.                                 with NCSA Mosaic for Xwindows.
  18. * Controlling Formatting::    How to control how Emacs-w3 formats HTML
  19. * HTTP/1.0 Support::        A detailed explanation of the HTTP/1.0
  20.                 and MIME support in Emacs-w3.
  21. * Advanced Features::           Some of the more arcane features.
  22. * More Help::                   How to get more help--mailing lists,
  23.                                 newsgroups, etc.
  24. * Future Directions::           What is planned for future revisions
  25.                                 of Emacs-w3
  26. * Programming Interface::       How to use emacs-w3 from other emacs
  27.                                 programs.
  28. Indices:
  29. * Concept Index::               Concept Index
  30. * Key Index::                   Menus of command keys and their references
  31. * Command Index::               Menus of commands and their references
  32. * Variable Index::              Menus of variables and their references
  33. File: w3,  Node: Introduction,  Next: Setting Up,  Prev: Top,  Up: Top
  34. Introduction
  35. ************
  36.    Emacs-w3 is an Emacs subsystem that allows the user to browse the
  37. wonderful World Wide Web.
  38.    The World Wide Web was started at the CERN physics institute in
  39. Switzerland in 1991.  The project was initially started by Tim
  40. Berners-Lee (timbl@info.cern.ch) for distributing data between
  41. different research groups effectively.
  42.    The Web has since grown into the most advanced information system
  43. currently on the internet.  It is now a global hypertext system with
  44. servers and browsers (programs written to interpret the hypertext
  45. language and display it correctly, and allow the user to follow links)
  46. exist for all major platforms (VMS, Windows, DOS, Unix, VM, NeXTstep,
  47. and Macintosh).
  48.    The basic concepts used in the Web are hypertext and hypermedia.
  49. Hypertext is the same as regular text, with one exception--it can
  50. contain links (cross-references) to other textual documents.  Hypermedia
  51. is slightly different--it can contain links to other forms of media
  52. (movies, sounds, interactive programs, etc.).
  53.    WWW also allows searches of indices that are located anywhere on the
  54. network; in this respect, it mirrors certain capabilities found in both
  55. WAIS and Gopher.
  56.                             ---------------
  57.                            CLIENT SIDE VIEW
  58.                             ---------------
  59.    The WWW world consists of documents, and links.  Indexes are special
  60. documents which, rather than being read, may be searched.  The result of
  61. such a search is another virtual document containing links to the
  62. documents found.  A simple protocol, HTTP is used to allow a browser
  63. program to request a keyword search by a remote information server.
  64.    The web contains documents in many formats.  Those documents which
  65. are hypertext, (real or virtual) contain links to other documents, or
  66. places within documents.  All documents, whether real, virtual or
  67. indexes, look similar to the reader and are contained within the same
  68. addressing scheme.
  69.                        ------------------------
  70.                        INFORMATION PROVIDER VIEW
  71.                        ------------------------
  72.    The WWW browsers can access many existing data systems via existing
  73. protocols (FTP, NNTP) or via HTTP and a gateway.  In this way, the
  74. critical mass of data is quickly exceeded, and the increasing use of the
  75. system by readers and information suppliers encourage each other.
  76.    Providing information is as simple as running the WWW server and
  77. pointing it at an existing directory structure.  The server
  78. automatically generates the a hypertext view of the files to guide the
  79. user around.
  80.    To personalize it, a few SGML hypertext files can be written to give
  81. an even more friendly view.  Also, any file available by anonymous FTP,
  82. or any internet newsgroup can be immediately linked into the web.  The
  83. very small start-up effort is designed to allow small contributions.  At
  84. the other end of the scale, large information providers may provide an
  85. HTTP server with full text or keyword indexing.  This may allow access
  86. to a large existing database without changing the way that database is
  87. managed.  Such gateways have already been made into Oracle(tm), WAIS,
  88. and Digital's VMS/Help systems, to name but a few.
  89.    The WWW model gets over the frustrating incompatibilities of data
  90. format between suppliers and reader by allowing negotiation of format
  91. between a smart browser and a smart server.  This should provide a
  92. basis for extension into multimedia, and allow those who share
  93. application standards to make full use of them across the web.
  94.    Here is some more specific information about what Emacs-w3 does and
  95. does not understand:
  96. * Menu:
  97. * Markup Languages Supported::    The different markup languages that
  98.                 Emacs-w3 understands natively.
  99. * Supported Protocols::        The different network protocols that
  100.                 Emacs-w3 speaks to.
  101. File: w3,  Node: Markup Languages Supported,  Next: Supported Protocols,  Prev: Introduction,  Up: Introduction
  102. Supported Markup Languages
  103. **************************
  104.    Two different markup languages are supported by Emacs-w3.
  105.                                ---------
  106.                                  HTML
  107.                                ---------
  108.    HTML is composed of a set of elements that define a document and
  109. guide its display.  An HTML element may include a name, some attributes
  110. and some text or hypertext, and appears in an HTML document as
  111. <tag_name>text</tag_name>, <tag_name
  112. attribute_name=argument>text</tag_name>, or just <tag_name>.
  113.    For example: `<title> My Useful Document </title>', and `<pre
  114. width=60> A lot of text here.  </pre>'.
  115.    An HTML document is composed of a single element: <html>...</html>,
  116. that is, in turn, composed of head and body elements: <head>...</head>,
  117. and <body>...</body>.  To allow older HTML documents to remain readable,
  118. <html>, <head>, and <body> are actually optional within HTML documents.
  119.    All the tags and attributes of HTML are fully supported in Emacs-w3.
  120.                                ---------
  121.                                  HTML+
  122.                                ---------
  123.    The HTML+ language is an extension of HTML, with a large degree of
  124. backwards compatibility.  See the internet draft by Dave Raggett for
  125. more information.  The following HTML+ language elements are supported
  126. by Emacs-w3:
  127.    * FORMS - forms are one of the most powerful aspects of HTML+.  They
  128.      allow the author of an HTML document to request information from
  129.      the person viewing the document.  Passwords, checkboxes, radio
  130.      buttons, and many more types of entry fields are possible.
  131.      Emacs-w3 supports all the input tags, as well as GET and POST
  132.      submission methods.  Emacs-w3 also supports the Mosaic 2.0 hack of
  133.      automatically submitting forms with a NAME of isindex.
  134.    * ID tags for headers and paragraphs.  This makes it possible to
  135.      reference points within a document and not require empty hypertext
  136.      links to do it.
  137.    * LINK support.  LINKs allow the author to specify the relevance
  138.      between documents easily.  This makes it possible to point to
  139.      dictionaries, glossaries, or indices, or to specify the author of
  140.      a document.
  141.    * Annotations.  Can have <footnote> and <margin> notes that show up
  142.      as footnotes at the bottom of a document.
  143.    * BR tag for explicit line breaks
  144.    * Notes and admonishments.  A way to specify a warning or other
  145.      standard information.  Shows appropriate bitmap if possible.
  146.      Similar to warning dialogs in Windows/Macintosh.
  147.    * Infinitely nested lists, and use of paragraphs and headers within
  148.      lists.
  149.                                ---------
  150.                                 Extras
  151.                                ---------
  152.    There are several different markup elements that are not officially
  153. part of HTML or HTML+ that Emacs-w3 supports.  These are either items
  154. that have been dropped from HTML+ because they would be too difficult
  155. for other browsers to implement or have been moved into another tag.
  156.    * RENDER support.  The render tag can be used to convert one tag into
  157.      another.  Syntax is <RENDER TAG="PROPNAME" STYLE="I">, which
  158.      replaces all <PROPNAME> tags with <I>, and all </PROPNAME> tags
  159.      with </I>.
  160.    * Entity definitions within documents.  This allows the author of an
  161.      HTML page to define per-document macros.  Syntax is <!ENTITY TAG
  162.      "Expansion of Tag">, which replaces all occurences of &TAG; with
  163.      Expansion of Tag.
  164.    * Roman numerals for ordered lists.  If an ordered list has an
  165.      optional ROMAN attribute (`<OL ROMAN>', then roman numerals are
  166.      used instead of normal arabic numbers.
  167.    * IMG and ALT support for list items.  If a list item has an IMG or
  168.      ALT tag (`<LI IMG="some.gif" ALT="text"'), then the list character
  169.      is replaced with either an icon or the ALT text.
  170.    * Specifying the hostname and port of an NNTP server in a news URL.
  171.      URLs of the form news://hostname:port/messageID work.
  172. File: w3,  Node: Supported Protocols,  Prev: Markup Languages Supported,  Up: Introduction
  173. Supported Protocols
  174. *******************
  175.    Emacs-w3 supports the following protocols
  176. Usenet News
  177.      Can either display an entire newsgroup or specific articles by
  178.      Message-ID: header.  This supports a unix-style .newsrc file, so
  179.      the user does not see articles they have read using another
  180.      newsreader, but due to how news URLs work, Emacs-w3 cannot update
  181.      the users .newsrc after they have read news.
  182.      Supports both the HTTP/0.9 and HTTP/1.0 protocols.  Fully
  183.      MIME-compliant with regards to HTTP/1.0. *Note HTTP/1.0 Support::
  184. Gopher
  185.      Support for all gopher types, include CSO searches.
  186. Gopher+
  187.      Support for Gopher+ retrievals. Support for converting ASK blocks
  188.      into HTML+ FORMS and submitting them back to the server.
  189.      FTP is handled by either ange-ftp or efs, the choice is up to the
  190.      individual user.
  191. Local files
  192.      Local files are handled, and MIME content-types are derived from
  193.      the file extensions.
  194. Telnet
  195.      Telnet is handled by running the Emacs Lisp function `telnet', or
  196.      spawning an xterm running telnet.
  197. TN3270
  198.      TN3270 is handled by running a tn3270 program in an Emacs buffer,
  199.      or spawning an xterm running tn3270.
  200.      Emacs-w3 supports the mailto: url scheme that causes a mail
  201.      message to be started to a specific address.
  202. X-exec
  203.      A URL can cause a local executable to be run, and its output
  204.      interpreted as if it had come from an HTTP server.  This is very
  205.      useful, but is still an experimental protocol, hence the X- prefix.
  206. Secure HTTP
  207.      Work is in progress to add support for the Secure HTTP
  208.      specification from Enterprise Information Technologies.  (1)
  209.    ---------- Footnotes ----------
  210.    (1)  The specification for SHTTP can be found on EIT's web server at
  211. http://www.commerce.net/information/standards/drafts/shttp.txt
  212. File: w3,  Node: Setting Up,  Next: Retrieving Emacs-w3,  Prev: Introduction,  Up: Top
  213. Setting Up
  214. **********
  215.    This section of the manual deals with getting, compiling, and
  216. configuring Emacs-w3.
  217. * Menu:
  218. * Retrieving Emacs-w3::         Retrieving Emacs-w3 via anonymous ftp
  219. * Compiling Emacs-w3::          Compiling Emacs-w3 and its associated files
  220. * Basic Setup::                 Basic setup that everyone needs to do
  221. * Firewalls::                   How to set Emacs-w3 up to use a particular
  222.                                 firewall setup.
  223. * Proxy Gateways::              Using CERN's proxy HTTP server
  224. File: w3,  Node: Retrieving Emacs-w3,  Next: Compiling Emacs-w3,  Prev: Setting Up,  Up: Setting Up
  225. Retrieving Emacs-w3
  226. ===================
  227.    If using Lucid Emacs 19.9, skip to the section on starting Emacs-w3.
  228. Emacs-w3 comes standard with all versions of Lucid Emacs from 19.9
  229. onwards.
  230.    Three files are required when first installing Emacs-w3.  All of them
  231. can be found via anonymous ftp to ftp.cs.indiana.edu:/pub/elisp/w3.  The
  232. files are `w3-XXX.tar.gz', where XXX is the version number of Emacs-w3
  233. being retrieved, `icons.tar.gz', which contains approximately 50 small
  234. icons that Emacs-w3 requires, and are available to HTML authors.  The
  235. `extras.tar.gz' file contains ange-ftp, html-mode, and nntp.
  236.    After retrieving the files, unpack them with the following commands:
  237. `zcat w3-XXX.tar.gz | tar xvvf -', `zcat icons.tar.gz | tar xvvf -',
  238. and `zcat extras.tar.gz | tar xvvf -'.  This unpacks the distribution
  239. into three subdirectories `w3', `icons', and `extras'.  To compile and
  240. install all the packages in the extras directory, please see the
  241. comments at the top of each lisp file.
  242. File: w3,  Node: Compiling Emacs-w3,  Next: Basic Setup,  Prev: Retrieving Emacs-w3,  Up: Setting Up
  243. Compiling Emacs-w3
  244. ==================
  245.    To install Emacs-w3, go into the `w3' subdirectory and edit the
  246. `Makefile'.  Three variables need to be changed:
  247. `EMACS'
  248.      This variable controls what version of Emacs is used to compile the
  249.      programs.  It should be the full path to the Emacs executable on
  250.      the system.  The default is to use Lucid Emacs (`lemacs').
  251. `LISPDIR'
  252.      This variable controls where the lisp code is copied to when it is
  253.      installed (with `make install').  This is usually the users
  254.      personal lisp code directory (I prefer `~/lisp').  The value is run
  255.      through "expand-file-name" and then added to the load-path.
  256. `DOTEMACS'
  257.      This variable points to the Emacs customization file, usually
  258.      `~/.emacs'.
  259. `INFODIR'
  260.      This variable points to the local info directory (usually
  261.      `/usr/local/info').  This can be any valid directory, as long as it
  262.      is in `Info-default-directory-list' so that info-mode can find it.
  263. `MAKEINFO'
  264.      This variables controls how the info files are built.  Possible
  265.      values are `makeinfo' or `emacs -batch -q -f batch-texinfo-format'.
  266. Once the `Makefile' has been modified, several different targets can be
  267. built.
  268. `make w3'
  269.      This compiles all the .el files into the much faster .elc files.
  270.      If Jamie Zawinski's optimizing byte compiler (standard in GNU
  271.      Emacs 19 and Lucid Emacs) is used, then a few compilation warnings
  272.      are displayed (not many hopefully).  These can be safely ignored
  273.      as long as everything finishes compiling.  This is the default
  274.      target for `make' with no arguments.
  275. `make install'
  276.      Compiles all the .el files and copies .el and .elc files into the
  277.      directory specified by `LISPDIR'.
  278. `make emacs'
  279.      Modifies the file specified by `DOTEMACS'.  A statement modifying
  280.      the load-path variable and size autoload statements is added to
  281.      the end of the file.
  282. `make all'
  283.      Compiles and installs the .el files, and also modify/create the
  284.      `DOTEMACS' file.
  285. `make w3.info'
  286.      Creates the Emacs-readable info files.  The info files are created
  287.      in the directory specified by `INFODIR'.  The makefile variable
  288.      `MAKEINFO' determines how the info file is built.
  289. `make w3.dvi'
  290.      Creates the printable documentation, using tex and texindex to
  291.      properly generate the indices.  A `w3.dvi' file is left in the
  292.      current directory.
  293. File: w3,  Node: Basic Setup,  Next: Firewalls,  Prev: Compiling Emacs-w3,  Up: Setting Up
  294. Basic Setup
  295. ===========
  296.    There are a few variables that almost all people need to change.
  297. `url-bad-port-list'
  298.      List of ports to warn the user about connecting to.  Defaults to
  299.      just the mail and NNTP ports so a malicious HTML author cannot
  300.      spoof mail or news to other people.
  301. `url-be-asynchronous'
  302.      Controls whether document retrievals over HTTP should be done in
  303.      the background.  This allows emacs to keep working in other
  304.      windows while large downloads occur.
  305. `w3-confirmation-func'
  306.      What function to use for asking yes or no functions.  Possible
  307.      values are 'yes-or-no-p or 'y-or-n-p, or any function that takes a
  308.      single argument (the prompt), and returns `t' only if a positive
  309.      answer is gotten.
  310. `w3-default-action'
  311.      A lisp symbol specifying what action to take for files with
  312.      extensions that are not in the w3-mime-extensions assoc list.
  313.      This is useful in case Emacs-w3 ever run across files with weird
  314.      extensions (.foo, .README, .READMEFIRST, etc.).  This should not
  315.      be required anymore.
  316.      Possible values: any lisp symbol.  Should be a function that takes
  317.      no arguments.  The return value does not matter, it is ignored.
  318.      Some examples are
  319.           Action            Value
  320.           ----------------------------------------------
  321.           Parse as HTML        'w3-prepare-buffer
  322.           View as text        'indented-text-mode
  323. `w3-default-homepage'
  324.      The url to open at startup.  It can be any valid URL.  This
  325.      defaults to the environment variable WWW_HOME if it is not set it
  326.      in the users `.emacs' file. If WWW_HOME is undefined, then it
  327.      defaults to the hypertext documentation for Emacs-w3 at Indiana
  328.      University.
  329. `w3-delay-image-loads'
  330.      Controls the loading of inlined images.  If non-`nil', images are
  331.      not loaded.  For slow network connections, this is usually set to
  332.      `t'.
  333. `w3-delimit-emphasis'
  334.      Whether to use characters at the start and end of each bold/italic
  335.      region.  Types of characters are specified in
  336.      `w3-style-chars-assoc'.  `w3-style-chars-assoc' is an assoc list
  337.      of style names, the `cdr' of each is a cons cell.  The `car' of
  338.      this cell is the string to insert at the beginning of the
  339.      emphasis, and the `cdr' is the string to insert at the end of the
  340.      emphasis.  The default value is a good example.
  341.           (
  342.            ("B"       "*"  . "*")
  343.            ("ADDRESS" "*"  . "*")
  344.            ("BYLINE"  "_"  . "_")
  345.            ("CITE"    "_"  . "_")
  346.            ("CMD"     "*"  . "*")
  347.            ("DFN"     "*"  . "*")
  348.            ("EM"      "~"  . "~")
  349.            ("I"       "~"  . "~")
  350.            ("Q"       "\"" . "\"")
  351.            ("REMOVED" ""   . "")
  352.            ("S"       ""   . "")
  353.            ("STRONG"  "*"  . "*")
  354.            ("SUB"     ""   . "")
  355.            ("SUP"     ""   . "")
  356.            ("U"       "_"  . "_")
  357.           )
  358. `w3-delimit-links'
  359.      Put brackets around links?  If this variable is `eq' to
  360.      `'linkname', then the link # is inserted after the link text.  If
  361.      `nil', then nothing is done.  If it is non-`nil' and not `eq' to
  362.      `'linkname', then [[ & ]] is inserted around the entire text of
  363.      the link.  Is initially set to be `t' iff in normal Emacs.  `nil'
  364.      if in Epoch or Lucid Emacs, since links should be in different
  365.      colors/fonts.
  366. `url-global-history-file'
  367.      The global history file used by both Mosaic/X and Emacs-w3.  This
  368.      file contains a list of all the URLs that have been visited.  This
  369.      file is parsed at startup and used to provide URL completion.
  370. `w3-hotlist-file'
  371.      Hotlist filename.  This should be the name of a file that is
  372.      stored in NCSA's Mosaic/X format (ncsa-mosaic-hotlist-format-1).
  373.      It is used to keep a listing of commonly accessed URL's without
  374.      having to go through 20 levels of menus to get to them.
  375. `w3-personal-annotation-directory'
  376.      Directory where Emacs-w3 looks for personal annotations.  This is
  377.      a directory that should hold the personal annotations stored in a
  378.      Mosaic-compatible format.
  379.      (ncsa-mosaic-personal-annotation-log-format-1)
  380. `url-pgp/pem-entity'
  381.      The name by which the user is known to PGP and/or PEM entities.
  382.      If this not set when w3-do-setup is run, it defaults to
  383.      `(user-real-login-name)'@`(system-name)', which can often be wrong.
  384. `url-personal-mail-address'
  385.      Your full email address.  This is what is sent to HTTP/1.0 servers
  386.      as the FROM field.  If this is not set when `w3-do-setup' is run,
  387.      then it defaults to the value of `url-pgp/pem-entity'.
  388. `w3-right-border'
  389.      Amount of space to leave on right margin of WWW buffers.  This
  390.      amount is subtracted from `(window-width)' for each new WWW buffer
  391.      and used as the new fill-column.
  392. `w3-track-mouse'
  393.      Controls whether to track the mouse and message the url under the
  394.      mouse.  If this is non-`nil', then a description of the hypertext
  395.      area under the mouse is shown in the minibuffer.  This shows what
  396.      type of link (inlined image, form entry area, delayed image,
  397.      delayed MPEG, or hypertext reference) is under the cursor, and the
  398.      destination.
  399. `w3-use-forms-index'
  400.      Non-`nil' means translate <ISINDEX> tags into a hypertext form.  A
  401.      single text entry box is drawn where the ISINDEX tag appears.  If
  402.      `t', the isindex handling is the same as Mosaic for X.
  403. `url-use-hypertext-gopher'
  404.      Controls how gopher documents are retrieved.  If non-`nil', the
  405.      gopher pages are converted into HTML and parsed just like any other
  406.      page.  If `nil', the requests are passed off to the `gopher.el'
  407.      package by Scott Snyder.  Using the `gopher.el' package loses the
  408.      gopher+ support, and inlined searching.
  409. `url-wais-gateway-port'
  410.      The port # of the WAIS gateway to pass all wais:// requests to.
  411.      *Note Native WAIS Support::
  412. `url-wais-gateway-server'
  413.      The machine name where the WAIS gateway lives.  *Note Native WAIS
  414.      Support::
  415. `url-xterm-command'
  416.      Command used to start a windowed shell, similar to an xterm.  This
  417.      string is passed through `format', and should expect four strings:
  418.      the title of the window, the program name to execute, and the
  419.      server and port number.  The default is for xterm, which is very
  420.      unix-centric, but is the most common case.
  421. File: w3,  Node: Firewalls,  Next: Proxy Gateways,  Prev: Basic Setup,  Up: Setting Up
  422. Firewalls
  423. =========
  424.    There are several different reasons why you may need to use the
  425. gateway support in Emacs-w3.
  426.   1. You are behind a firewall.  This is usually the case at large
  427.      corporations with moderately paranoid system-administrators.
  428.   2. You are using TERM (1) for slip-like access to the internet.
  429.      NOTE: Emacs 19.22 has patches to enable native TERM networking, to
  430.      enable it, #define TERM in the appropriate s/*.h file for your
  431.      operating system, then change the SYSTEM_LIBS define to include
  432.      the `termnet' library that comes with the latest versions of TERM.
  433.   3. For some reason your version of Emacs can't resolve hostnames.
  434.      This happens quite often on Sun workstations and some ultrix
  435.      machines.  Some C libraries do not include the hostname resolver
  436.      routines in their static libraries.  If Emacs was linked
  437.      statically, this means it won't be able to get to any machines off
  438.      your local net.  This is characterized by being able to reach
  439.      someplace with a raw ip number, but not its hostname
  440.      (http://129.79.254.191/ works, but http://www.cs.indiana.edu/
  441.      doesn't).
  442.      If for some reason your system administrator will not recompile
  443.      Emacs with the `-lresolv' library or dynamic linking, you need to
  444.      act as if you were behind a firewall.
  445.   4. You are running Lucid Emacs 19.x and Solaris 2.x (SunOS 5.x).  For
  446.      some reason, network processes under Solaris and Lucid Emacs never
  447.      get a status of `exit' or `closed'.  This causes retrieval of HTTP
  448.      and gopher pages to hang indefinitely, with Emacs chewing up large
  449.      amounts of your CPU time.
  450.      NOTE: You do not need to use gateways anymore for this problem.
  451.      With the release of Lucid Emacs 19.10, this problem is fixed if you
  452.      #define FIX_SOLARIS_W3_BUG somewhere in your config.h or s/*.h
  453.      configuration file.  This will be in the stock 19.11 release of
  454.      XEmacs
  455.    Emacs-w3 has support for using the gateway mechanism only for
  456. certain domains.  To use this, you must change the value of
  457. `url-gateway-local-host-regexp'.  This should be a regular expression
  458. (2) that matches local hosts that do not require the use of a gateway.
  459. If `nil', then all connections are made through the gateway.
  460.    Emacs-w3 supports several methods of getting around gateways.  The
  461. variable `url-gateway-method' controls which of these methods is used.
  462. This variable can have several values (use these as symbol names, not
  463. strings):
  464. "program"
  465.      Run a program in a subprocess to connect to remote hosts (examples
  466.      are itelnet(3), an expect(4) script, etc.).
  467. "host"
  468.      This allows you to log into another local computer that has access
  469.      to the internet, and run a telnet-like program from there.
  470. "tcp"
  471.      Masanobu UMEDA umerin@mse.kyutech.ac.jp has written a very nice
  472.      replacement for the standard networking in Emacs.  This does
  473.      basically the same thing that a method of `program' does, but is
  474.      slightly more transparent to the user.
  475. "native"
  476.      This means that Emacs-w3 should use the builtin networking code of
  477.      Emacs.  This should be used only if there is no firewall, or
  478.      someone at your site has already hacked the Emacs source to get
  479.      around your firewall.  Two of these need a bit more explanation
  480. than that: If you are running a program in a subprocess to emulate a
  481. network connection, you need to set a few extra variables.  The variable
  482. `url-gateway-telnet-program' should point to an executable that accepts
  483. a hostname and port # as its arguments, and passes standard input to
  484. the remote host.  This can be either the full path to the executable or
  485. just the basename.  The variable `url-gateway-telnet-ready-regexp'
  486. controls how long Emacs-w3 should wait after spawning the subprocess to
  487. start sending to its standard input.  This gets around a bug where
  488. telnet would miss the beginning of requests becausse it did not buffer
  489. its input before opening a connection.  This should be a regular
  490. expression to watch for that signifies the end of the setup of
  491. `url-gateway-telnet-program'.  The default should work fine for telnet.
  492.    If you are using the `host'-based gatway method, things get a bit
  493. more complicated.  This is basically my attempt to do some of the basic
  494. stuff of expect within elisp.  First off, set the variable
  495. `url-gateway-host' to be the name of your gateway machine.
  496.    The variable `url-gateway-host-program' controls how the host is
  497. reached.  The easiest way is to have a program that does not require a
  498. username and password to allow you to login.  The most common of these
  499. is the "rsh" command.
  500.    If you do not have rsh, then things get very ugly.  First, set the
  501. variable `url-gateway-program-interactive' to non-`nil'.  Then you need
  502. to define the variables `url-gateway-host-username' and
  503. `url-gateway-host-password' to be the username and password necessary
  504. to log into the gateway machine.  The regular expressions in the
  505. variables `url-gateway-handholding-login-regexp' and
  506. `url-gateway-handholding-password-regexp' should match the login and
  507. password prompts on the gateway system respectively.  For example:
  508.      (setq url-gateway-host-program "telnet"
  509.            url-gateway-program-interactive t
  510.            url-gateway-host-username "wmperry"
  511.            url-gateway-host-password "yeahrightkeepdreaming"
  512.            url-gateway-host "moose.cs.indiana.edu"
  513.            url-gateway-host-program-ready-regexp "Escape character is .*"
  514.            url-gateway-handholding-login-regexp "ogin:"
  515.            url-gateway-handholding-password-regexp "ord:")
  516.    This should take care of you logging into the remote system.  The
  517. variable `url-gateway-host-prompt-pattern' should contain a regular
  518. expression that matches the shell prompt on the remote machine.  This
  519. should appear no where in the login banner/setup, or things could get
  520. very confused.
  521.    Now you are ready to actually get off of your local network!  The
  522. variable `url-gateway-host-program-ready-regexp' should contain a
  523. regular expression that matches the end of the setup of
  524. `url-gateway-host-program' when it tries to make a connection to an
  525. off-firewall machine.  (Basically the same as
  526. `url-gateway-telnet-ready-regexp'.
  527.    Now you should be all set up to get outside your local network.  If
  528. none of this makes sense, its probably my fault.  Please check with your
  529. network administrators to see if they have a program that does most of
  530. this for you already, since somebody somewhere at your company has
  531. probably been through something similar to this before, and would be
  532. much more helpful/knowledgeable about your local setup than I would be.
  533. But feel free to mail me as a last resort.
  534.    ---------- Footnotes ----------
  535.    (1)  TERM is a user-level protocol for emulating IP over a serial
  536. line.  More information is available at
  537. sunsite.unc.edu:/pub/Linux/apps/comm/term
  538.    (2)  Please see the full Emacs distribution for a description of
  539. regular expressions
  540.    (3)  Itelnet is a standard name for a telnet executable that is
  541. capable of escaping the firewall.  Check with your system
  542. administrators to see if you have anything similar
  543.    (4)  Expect is a scripting language that allows you to control
  544. interactive programs (like telnet) very easily.  It is available from
  545. gatekeeper.dec.com:/pub/GNU/expect-3.24.0.tar.gz
  546. File: w3,  Node: Proxy Gateways,  Next: Basic Usage,  Prev: Firewalls,  Up: Setting Up
  547. Proxy Gateways
  548. ==============
  549.    In late January, Kevin Altis and Lou Montulli proposed and
  550. implemented a new proxy service.  This service requires the use of
  551. environment variables to specify a gateway server/port # to send
  552. protocol requests to.  Each protocol (http, wais, gopher, ftp, etc.)
  553. can have a different gateway server.  The environment variables are
  554. PROTOCOL_proxy, where PROTOCOL is one of gopher, telnet, file, http,
  555. ftp, tn3270, news, mailto, www, or wais.
  556.    The main thing to understand about the proxy gateway is that instead
  557. of a partial URL being sent to the HTTP server, which is what we do
  558. today when a client talks directly to an HTTP server, a client must
  559. send a full URL (http://..., gopher://..., ftp://...) to the proxy
  560. gateway server, the rest of the HTTP message is the same. For gopher
  561. and ftp, the proxy gateway server returns the data encapsulated as a
  562. MIME content type to the client like a normal HTTP message. HTTP MIME
  563. content types are returned for all URL requests, regardless of the
  564. protocol type of the URL. FTP directories, Gopher directories, etc. are
  565. returned as text/html.
  566. File: w3,  Node: Basic Usage,  Prev: Proxy Gateways,  Up: Top
  567. Basic Usage
  568. ***********
  569.    Emacs-w3 is similar to the Info package all Emacs users hold near
  570. and dear to their hearts (*Note Info: (info)Top, for a description of
  571. Info).  Basically, `space' and `backspace' control scrolling, and
  572. `return' or `mouse2' follows a hypertext link.  The `f' and `b' keys
  573. maneuver around the various links on the page.
  574.    On non-graphic terminals (vt100, DOS, etc.), or with a graphics
  575. terminal and old versions (18.xx) of Emacs, hypertext links are
  576. surrounded by '[[' and ']]' by default.  On a graphics terminal with
  577. newer versions of Emacs (epoch, lucid, or FSF 19), the links are in
  578. bold print.  *Note Controlling Formatting:: for information on how to
  579. change this, or for help on getting the highlighting to work on graphics
  580. terminals.
  581.    There are approximately 50 keys bound to special Emacs-w3 functions.
  582. The basic rule of thumb regarding keybindings in Emacs-w3 is that a
  583. lowercase key takes an action on the current document, and an uppercase
  584. key takes an action on the document pointed to by the hypertext link
  585. under the cursor.
  586.    There are several areas that the keybindings fall into: movement,
  587. information, action, and miscellaneous.
  588. * Menu:
  589. * Movement::        Moving around in a Emacs-w3 buffer
  590. * Information::        Getting information about the Emacs-w3 document you
  591.             are viewing, and/or links within that document.
  592. * Action::        Taking actions in a Emacs-w3 buffer (following links,
  593.             printing, etc.)
  594. * Miscellaneous::    Miscellaneous keybindings
  595. File: w3,  Node: Movement,  Next: Information,  Prev: Basic Usage,  Up: Basic Usage
  596. Movement
  597. ========
  598. `SPC'
  599.      Scroll downward in the buffer.  With prefix arg, scroll down that
  600.      many screenfuls.
  601. `DEL'
  602.      Scroll upward in the buffer.  With prefix arg, scroll up that many
  603.      screenfuls.
  604. `<, M-x w3-start-of-document'
  605.      Go to start of document
  606. `>, M-x w3-end-of-document'
  607.      Go to end of document
  608. `b, M-x w3-back-link'
  609.      Attempts to move backward one link area in the current document.
  610.      Signals an error if no previous links are found.
  611. `M-x w3-show-hotlist'
  612.      A hypertext listing of the items in the hotlist is generated on
  613.      the fly, and the links can be followed normally.
  614. `H, M-x w3-use-hotlist'
  615.      Possibly go to a link in the hotlist.  A new buffer is created for
  616.      the new document.
  617. `m, M-x w3-complete-link'
  618.      Choose a link from the current buffer and follow it.  A
  619.      completing-read is done on all the links, so `space' and `TAB' can
  620.      be used for completion.
  621. `f, n, M-x w3-forward-link'
  622.      Attempts to move forward one link area in the current document.
  623.      Signals an error if no more links are found.
  624. File: w3,  Node: Information,  Next: Action,  Prev: Movement,  Up: Basic Usage
  625. Information
  626. ===========
  627.    These functions relate information about one or more links on the
  628. current document.
  629. `v, M-x url-view-url'
  630.      This shows the URL of the current document in the minibuffer.
  631. `V, M-x w3-view-this-url'
  632.      This shows the URL of the hypertext link under point in the
  633.      minibuffer.  If there is not a hypertext link under point, then it
  634.      shows the type of form entry area under point.  If there is no
  635.      form entry area under point, then it shows the inlined image's URL
  636.      that is under point, if any.
  637. `s, M-x w3-source-document'
  638.      This shows the HTML source of the current document in a separate
  639.      buffer.  The `buffer-name' is based on the document's URL.
  640. `S, M-x w3-source-document-at-point'
  641.      Shows the HTML source of the hypertext link under point in a
  642.      separate buffer.  The `buffer-name' is based on the document's URL.
  643. `k, C-k, M-x w3-save-url'
  644.      This stores the current document's URL in the kill ring, and also
  645.      in the current window-system's clipboard, if possible.
  646. `K, M-x w3-save-this-url'
  647.      Stores the URL of the document under point in the kill ring, and
  648.      also in the current window-system's clipboard, if possible.
  649. File: w3,  Node: Action,  Next: Miscellaneous,  Prev: Information,  Up: Basic Usage
  650. Action
  651. ======
  652.    First, here are the keys and functions that bring up a new hypertext
  653. page, usually creating a new buffer.
  654. `return'
  655.      Pressing return attempts to follow the link under the cursor.
  656.      With a prefix argument (`C-u'), this forces the file to be saved
  657.      to disk instead of being passed off to other viewers or being
  658.      parsed as HTML.
  659. `button2, M-x w3-follow-mouse'
  660.      This function expects to be bound to a mouse button.  It movess to
  661.      the point under mouse and try to fetch the link that was clicked
  662.      on.  If no link is found, a message is displayed in the minibuffer.
  663. `C-button2, M-return, M-x w3-follow-inlined-image'
  664.      This function tries to retrieve the inlined image that is under
  665.      point.  It ignores any form entry areas or hyperlinks, and blindly
  666.      follows any inlined image.  Useful for seeing images that are
  667.      meant to be used as hyperlinks when you are not on a terminal
  668.      capable of displaying graphics.
  669. `m, M-x w3-complete-link'
  670.      Does a completing-read on all the hypertext links in the current
  671.      buffer.  Use `space' and `tab' to complete on the links.
  672. `r, g, M-x w3-reload-document'
  673.      This reloads the current document--the current buffer is killed,
  674.      and the URL it was visiting is fetched and redisplayed.  Your
  675.      position within the buffer remains the same (unless the document
  676.      has changed since you last retrieved it, in which case it should
  677.      be relatively close).
  678. `C-o, M-x w3-fetch'
  679.      This function prompts for a URL in the minibuffer, and attempts to
  680.      fetch it.  If there are any errors, or Emacs-w3 cannot understand
  681.      the type of link you requested, the errors are displayed in a
  682.      hypertext buffer.
  683. `o, M-x w3-open-local'
  684.      Find a local file, interactively.  This prompts you for a local
  685.      file name to open.  The file must exist, and may be a directory.
  686.      If the requested file is a directory and `url-use-hypertext-dired'
  687.      is `nil', then a dired-mode buffer is displayed.  If non`nil',
  688.      then Emacs-w3 automatically generates a hypertext listing of the
  689.      directory.  The hypertext mode is the default, so that all the
  690.      keys and functions remain the same.
  691. `M-s, M-x w3-search'
  692.      Perform a search, if this is a searchable index.  This sends a
  693.      string of the type `'URL?search-terms'' to the server this
  694.      document was retrieved from.  Searching requires a server,
  695.      Emacs-w3 can not do local file searching, as there are too many
  696.      possible types of searches people could want to do.  The only URL
  697.      types that allow searching are HTTP and X-EXEC
  698. `C-c C-b, M-x w3-show-history-list'
  699.      If `url-keep-history' is non-`nil', then Emacs-w3 keeps track of
  700.      all the URLs you visit in an Emacs session.  This function takes
  701.      all the links that are in that internal list, and formats them as
  702.      hypertext links in a list.
  703.    And here are the commands to move around between Emacs-w3 buffers:
  704. `l, M-x w3-goto-last-buffer'
  705.      Go to last WWW buffer visited
  706. `q, M-x w3-quit'
  707.      Quits WWW mode.  This kills the current buffer and goes to the most
  708.      recently visited buffer.
  709. `u, M-x w3-leave-buffer'
  710.      This is similar to w3-quit, but the buffer is not killed, it is
  711.      moved to the bottom of the buffer list (so it is the least likely
  712.      to show up as the default with switch-to-buffer).
  713. `B, M-x w3-backward-in-history'
  714.      Take one step back along the path in the current history.  Has no
  715.      effect if at the beginning of the history list.
  716. `F, M-x w3-forward-in-history'
  717.      Take one step forward along the path in the current history.  Has
  718.      no effect if at the end of the history list.
  719. File: w3,  Node: Miscellaneous,  Prev: Action,  Up: Basic Usage
  720. Miscellaneous
  721. =============
  722. `M-m, M-x w3-mail-current-document'
  723.      Mails the current document to someone.  Choose from 3 different
  724.      formats to mail: formatted text, HTML source, or LaTeX source.
  725.      When the HTML source is mailed, then an appropriate <base> tag is
  726.      inserted at the beginning of the document so that relative links
  727.      may be followed correctly by whoever receives the mail.
  728. `M-M, M-x w3-mail-document-under-point'
  729.      Mails the document pointed to by the hypertext link under point to
  730.      someone.  Choose from 3 different formats to mail: formatted text,
  731.      HTML source, or LaTeX source.  When the HTML source is mailed,
  732.      then an appropriate <base> tag is inserted at the beginning of the
  733.      document so that relative links may be followed correctly by
  734.      whoever receives the mail.
  735. `p, M-x w3-print-this-url'
  736.      Prints the current document.  Choose from 3 different formats to
  737.      print: formatted text, HTML source, or postscript (by using LaTeX
  738.      and dvips).
  739.      When the formatted text is printed, the normal `lpr-buffer'
  740.      function is called, and the variables `lpr-command' and
  741.      `lpr-switches' control how the document is printed.
  742.      When the HTML source is printed, then an appropriate <base> tag is
  743.      inserted at the beginning of the document.  When postscript is
  744.      printed, then the HTML source of the document is converted into
  745.      LaTeX source.  If the variable `w3-use-html2latex' is non-`nil',
  746.      then the program specified by `w3-html2latex-prog' is run in a
  747.      subprocess with the arguments in `w3-html2latex-args'.  The
  748.      `w3-html2latex-prog' must accept HTML source on its standard input
  749.      and send the LaTeX output to standard output.  If
  750.      `w3-use-html2latex' is `nil', then an Emacs Lisp function uses
  751.      regular expressions to replace the HTML code with LaTeX markup.
  752.      The variable `w3-latex-docstyle' controls how the document is laid
  753.      out in this case, and postscript figures are printed as well.
  754. `P, M-x w3-print-url-under-point'
  755.      Prints the document pointed to by the hypertext link under point.
  756.      Please see the documentation for `w3-print-this-url' directly above
  757.      for more information.
  758. `M-x w3-insert-formatted-url'
  759.      Insert a fully formatted HTML link into another buffer.  This gets
  760.      the name and URL of either the current buffer, or, with a prefix
  761.      arg, of the link under point, and construct the appropriate
  762.      <a...>...</a> markup and insert it into the desired buffer.
  763. `M-tab, M-x w3-insert-this-url'
  764.      Inserts the URL of the current document into another buffer.
  765.      Buffer is prompted for in the minibuffer.  With prefix arg, uses
  766.      the URL of the link under point.
  767. `U, M-x w3-use-links'
  768.      Select one of the <LINK> tags from this document and fetch it.
  769.      Links are attributes of a specific document, and can tell such
  770.      things as who made the document, where a table of contents is
  771.      located, etc.
  772.      This allows you to follow the <link...> tags in the current
  773.      document.  Link tags specify relationships between documents in
  774.      two ways.  Normal (forward) relationships (where the link has a
  775.      REL="xxx" attribute), and reverse relationships (where the link
  776.      has a REV="xxx" attribute).  This first asks what type of link you
  777.      want to follow (Normal or Reverse), then does a `completing-read'
  778.      on only the links that have that type of relationship.
  779. File: w3,  Node: Compatibility w/Mosaic,  Up: Top
  780. Compatibility with NCSA Mosaic
  781. ******************************
  782.    Since NCSA Mosaic for Xwindows is the de-facto hypertext browser at
  783. most sites, Emacs-w3 is compatible with it in several ways.
  784. * Menu:
  785. * Hotlist Handling::            A hotlist is an easy way to keep track of
  786.                 interesting Web pages without having to
  787.                 remember the exact path to get there.
  788. * Session History::             Keeping a history of where you have been
  789.                 in one Emacs sessions allows the use of
  790.                 'forward' and 'back' buttons easily.
  791. * Global History::        Keeping a history of all the places you
  792.                 have visited on the web.
  793. * Annotations::                 Annotations allow you to write comments
  794.                 on other people's Web documents without
  795.                 needing to change their document.
  796. File: w3,  Node: Hotlist Handling,  Next: Session History,  Prev: Compatibility w/Mosaic,  Up: Compatibility w/Mosaic
  797. Hotlist Handling
  798. ================
  799.    In order to avoid having to traverse many documents to get to the
  800. same document over and over, Emacs-w3 supports a "hotlist" like Mosaic.
  801. This is a file that contains URLs and aliases.  You can quickly go to
  802. any document in the Web, providing you've been there before and added
  803. it to your hotlist.  The variable `w3-hotlist-file' determines where
  804. this information is saved.  The structure of the file is compatible with
  805. Mosaic's hotlist file, so this defaults to `~/.mosaic-hotlist-default'.
  806.    Hotlist commands are:
  807. `a, M-x w3-hotlist-add-document'
  808.      This adds the current document to your hotlist, with the buffer
  809.      name as its identifier.  Modifies the file specified by
  810.      `w3-hotlist-file'.  If this is given a PREFIX-ARGUMENT (via
  811.      `C-u'), the title is prompted for instead of automatically
  812.      defaulting to the `buffer-name'.
  813. `M-x w3-hotlist-refresh'
  814.      This rereads the default hostlist file specified by
  815.      `w3-hotlist-file'.
  816. `d, M-x w3-hotlist-delete'
  817.      Prompts for the alias of the entry to kill.  You may press the
  818.      spacebar or tab key for partial completions.  Once you select the
  819.      item to delete, the internal representation of the hotlist is
  820.      updated, and the file specified by `w3-hotlist-file' is updated.
  821. `M-x w3-hotlist-rename-entry'
  822.      Some hotlist item names can be very unwieldy (`Mosaic for X level
  823.      2 fill out form support'), or uninformative (`Index of /').  If
  824.      you are not satisfied with how a specific item is labeled, you may
  825.      change it by typing `M-x w3-rename-hotlist-entry'.  Prompts for
  826.      the item to rename in the minibuffer--use the spacebar or tab key
  827.      for completion.  After having chosen an item to rename, prompts
  828.      for a new title until a unique title is entered.  Modifies the
  829.      file specified by `w3-hotlist-file'.
  830. `H, M-x w3-use-hotlist'
  831.      Prompts you for the alias to jump to.  You may press the spacebar
  832.      or tab key for partial completions.
  833. `M-x w3-show-hotlist'
  834.      This converts your hotlist into an ordered list and parse it as
  835.      HTML.
  836. File: w3,  Node: Session History,  Next: Global History,  Prev: Hotlist Handling,  Up: Compatibility w/Mosaic
  837. History
  838. =======
  839.    NCSA Mosaic keeps track of the URLs you have followed from a page, so
  840. that it can provide forward and back buttons to keep a path of URLs
  841. that you can review easily.  If you set the variable `url-keep-history'
  842. to `t', then Emacs-w3 keeps a list of all the URLs you visit in a
  843. session.  To see a listing of your history for this session of
  844. Emacs-w3, type `M-x w3-show-history' from any buffer, and Emacs-w3
  845. generates an HTML document showing every URL you have visited since you
  846. started Emacs (or cleared the history list), and then format it.  Any
  847. of the links can be chosen and followed to the original document.  To
  848. clear the history list, choose 'Clear History' from the 'Options' menu.
  849.    Another twist on the history list mechanism is the fact that all
  850. Emacs-w3 buffers remember what URL, buffer, and buffer position you
  851. were at before jumping to this document, and also keeps track of where
  852. you jump to from that buffer.  This means that you can go forwards and
  853. backwards very easily along the path you took to reach a particular
  854. document.  To go forward, use the function `w3-forward-in-history', to
  855. go backward, use the function `w3-backward-in-history'.  These are
  856. fairly stable functions, but may not work as expected all the time.
  857. First, the buffer-list is used to look at the URL of every buffer, and
  858. if it matches the item in the history list you are looking for, then it
  859. is brought forward.  If no buffer containing the desired URL is found,
  860. then the URL is fetched.  Then the desired position in the buffer is
  861. searched for.
  862. File: w3,  Node: Global History,  Next: Annotations,  Prev: Session History,  Up: Compatibility w/Mosaic
  863. Global History
  864. ==============
  865.    Mosaic supports the idea of a "history" of URLs the user has visited,
  866. and it displays them in a different style than normal URLs.  If you set
  867. the variable `url-keep-history' to `t', then Emacs-w3 keeeps a list of
  868. all the URLs you visit in a session.  The file is automatically written
  869. to disk when exiting emacs.  The list is added to those already in the
  870. file specified by `url-global-history-file', which defaults to
  871. `~/.mosaic-global-history'.
  872.    If any URL in the list is found in the file, it is not saved, but new
  873. ones are added at the end of the file.
  874.    One of the nice things about keeping a global history files is that
  875. Emacs-w3 can use it as a completion table.  When doing `M-x w3-fetch',
  876. you can hit the `tab' or `space' keys to complete on a partial URL.
  877. This is very useful, especially for very long URLs that you didn't add
  878. to your hotlist, or for seeing all the pages from a particular web
  879. server before choosing which you want to see.
  880. File: w3,  Node: Annotations,  Next: Group Annotations,  Prev: Global History,  Up: Compatibility w/Mosaic
  881. Annotations
  882. ===========
  883.    Mosaic allows you to annotate documents.  You can type in comments
  884. about the current document, and these annotations appear as a link to
  885. your comments at the end of the document when you browse it in Mosaic.
  886. The original file is not changed.  There are two types of annotations
  887. supported in Mosaic, and both are supported by Emacs-w3 as well.
  888. * Menu:
  889. * Group Annotations::             Annotations accessible by everyone
  890. * Personal Annotations::          Private annotations only you see
  891. File: w3,  Node: Group Annotations,  Next: Personal Annotations,  Prev: Annotations,  Up: Annotations
  892. Group Annotations
  893. -----------------
  894.    NOTE: The group annotation experiment has been terminated.  It will
  895. be replaced with support on the server side for adding <LINK> tags to
  896. documents.
  897.